from typing import List


class Solution:
    def searchInsert(self, nums: List[int], target: int) -> int:
        if target in nums:
            return nums.index(target)
        elif target > nums[-1]:
            return len(nums)
        else:
            for i in nums:
                if i > target:
                    return nums.index(i)


if __name__ == '__main__':
    s = Solution()
    nums = [1, 3, 5, 6]
    target = 0
    print(s.searchInsert(nums, target))
